#include <stdio.h>
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#include "2d.h"

const int A = 4;
const int B = 4;

int main() {
    Array2D arr;
    int i,j;
    arr2d_init(&arr, A, B);
    for(i = 0; i < A; i++) {
        for(j = 0; j < B; j++){
            arr2d_put(&arr, i, j, 0); 
            if(i == j) {
                arr2d_put(&arr, i, j, 2); 
            }
            printf("%2d", arr2d_get(&arr, i, j));
        }
        printf("\n\n");
    }
	arr2d_delete(&arr);
	_CrtDumpMemoryLeaks();
}